package com.isdepci.project.carbon.domain;

import com.isdepci.common.utils.DateUtils;
import com.isdepci.framework.web.domain.BaseEntity;
import com.isdepci.project.system.domain.SysUser;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 能源站信息对象 station_info
 *
 * @author isdepci
 * @date 2023-05-08
 */
public class StationInfo extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** 站ID */
    private Long stationId;

    /** 站名称 */
    private String stationName;

    /** 站编码 */
    private String stationCode;

    /** 一级类型  1能源站 2储能站 */
    private Integer stationType;

    /** 二级类型  */
    private String stationTypeCode;

    /** 省份代码 */
    private String provinceCode;

    /** 城市代码 */
    private String cityCode;

    /** 县区代码 */
    private String zoneCode;

    /** 所属位置 */
    private String belongLocation;

    /** 所属单位 */
    private String belongUnit;

    /** 所属建筑 */
    private String belongBuilding;

    /** 经度 */
    private String longitude;

    /** 纬度 */
    private String latitude;

    /** 经纬度二维码 */
    private String latLonImg;

    /** 状态 1正常  0弃用 */
    private Integer status;

    /** 排序 */
    private Integer sortNum;

    /** 部门ID */
    private Long deptId;

    /** 用户ID */
    private Long userId;


    //设备列表  设备类型
    private String deviceType;

    /**
     * holiday_id	 节假日设置
     * run_type	  0手动运行  1策略运行
     */
    private Long holidayId;
    private Integer runType;

    private BigDecimal totalPeakPower;//total_peak_power 峰值总功率kWp
    private BigDecimal totalInCapacity;//total_in_capacity	装机总容量kWh
    private BigDecimal totalInPower;//total_in_power	装机总功率kW
    private BigDecimal peakCuttingAbility;//peak_cutting_ability	削峰能力kW
    private BigDecimal fillValleyAbility;//fill_valley_ability	填谷能力kW
    private BigDecimal frequencyModulationAbility;//frequency_modulation_ability	调频能力kW
    private Integer tradeNum;//trade_num 交易次数
    private BigDecimal tradeEle;//trade_ele	交易电量kWh
    private BigDecimal settlementFee;//settlement_fee	结算费用万元
    private Integer resNum;//res_num 响应次数
    private BigDecimal resDeviationRate;//res_deviation_rate	响应偏差率%
    private BigDecimal resCompletionRate;//res_completion_rate	响应完成率%
    private BigDecimal resEle;//res_ele	响应电量kWh

    public void setCreateUserInfo(SysUser user) {
        this.userId = user.getUserId();
        this.deptId = user.getDeptId();
        this.setCreateTime(DateUtils.getNowDate());
    }

    public void setDefaultTotal() {
        this.totalPeakPower = BigDecimal.ZERO;//total_peak_power 峰值总功率kWp
        this.totalInCapacity = BigDecimal.ZERO;//total_in_capacity	装机总容量kWh
        this.totalInPower = BigDecimal.ZERO;//total_in_power	装机总功率kW
        this.peakCuttingAbility = BigDecimal.ZERO;//peak_cutting_ability	削峰能力kW
        this.fillValleyAbility = BigDecimal.ZERO;//fill_valley_ability	填谷能力kW
        this.frequencyModulationAbility = BigDecimal.ZERO;//frequency_modulation_ability	调频能力kW
        this.tradeNum = 0;//trade_num 交易次数
        this.tradeEle = BigDecimal.ZERO;//trade_ele	交易电量kWh
        this.settlementFee = BigDecimal.ZERO;//settlement_fee	结算费用万元
        this.resNum = 0;//res_num 响应次数
        this.resDeviationRate = BigDecimal.ZERO;//res_deviation_rate	响应偏差率%
        this.resCompletionRate = BigDecimal.ZERO;//res_completion_rate	响应完成率%
        this.resEle = BigDecimal.ZERO;//res_ele	响应电量kWh
    }

    public BigDecimal getTotalPeakPower() {
        return totalPeakPower;
    }

    public void setTotalPeakPower(BigDecimal totalPeakPower) {
        this.totalPeakPower = totalPeakPower;
    }

    public BigDecimal getTotalInCapacity() {
        return totalInCapacity;
    }

    public void setTotalInCapacity(BigDecimal totalInCapacity) {
        this.totalInCapacity = totalInCapacity;
    }

    public BigDecimal getTotalInPower() {
        return totalInPower;
    }

    public void setTotalInPower(BigDecimal totalInPower) {
        this.totalInPower = totalInPower;
    }

    public BigDecimal getPeakCuttingAbility() {
        return peakCuttingAbility;
    }

    public void setPeakCuttingAbility(BigDecimal peakCuttingAbility) {
        this.peakCuttingAbility = peakCuttingAbility;
    }

    public BigDecimal getFillValleyAbility() {
        return fillValleyAbility;
    }

    public void setFillValleyAbility(BigDecimal fillValleyAbility) {
        this.fillValleyAbility = fillValleyAbility;
    }

    public BigDecimal getFrequencyModulationAbility() {
        return frequencyModulationAbility;
    }

    public void setFrequencyModulationAbility(BigDecimal frequencyModulationAbility) {
        this.frequencyModulationAbility = frequencyModulationAbility;
    }

    public Integer getTradeNum() {
        return tradeNum;
    }

    public void setTradeNum(Integer tradeNum) {
        this.tradeNum = tradeNum;
    }

    public BigDecimal getTradeEle() {
        return tradeEle;
    }

    public void setTradeEle(BigDecimal tradeEle) {
        this.tradeEle = tradeEle;
    }

    public BigDecimal getSettlementFee() {
        return settlementFee;
    }

    public void setSettlementFee(BigDecimal settlementFee) {
        this.settlementFee = settlementFee;
    }

    public Integer getResNum() {
        return resNum;
    }

    public void setResNum(Integer resNum) {
        this.resNum = resNum;
    }

    public BigDecimal getResDeviationRate() {
        return resDeviationRate;
    }

    public void setResDeviationRate(BigDecimal resDeviationRate) {
        this.resDeviationRate = resDeviationRate;
    }

    public BigDecimal getResCompletionRate() {
        return resCompletionRate;
    }

    public void setResCompletionRate(BigDecimal resCompletionRate) {
        this.resCompletionRate = resCompletionRate;
    }

    public BigDecimal getResEle() {
        return resEle;
    }

    public void setResEle(BigDecimal resEle) {
        this.resEle = resEle;
    }

    public Long getHolidayId() {
        return holidayId;
    }

    public void setHolidayId(Long holidayId) {
        this.holidayId = holidayId;
    }

    public Integer getRunType() {
        return runType;
    }

    public void setRunType(Integer runType) {
        this.runType = runType;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public void setStationId(Long stationId){
        this.stationId = stationId;
    }

    public Long getStationId(){
        return stationId;
    }
    public void setStationName(String stationName){
        this.stationName = stationName;
    }

    public String getStationName(){
        return stationName;
    }
    public void setStationCode(String stationCode){
        this.stationCode = stationCode;
    }

    public String getStationCode(){
        return stationCode;
    }
    public void setStationType(Integer stationType){
        this.stationType = stationType;
    }

    public Integer getStationType(){
        return stationType;
    }
    public void setStationTypeCode(String stationTypeCode){
        this.stationTypeCode = stationTypeCode;
    }

    public String getStationTypeCode(){
        return stationTypeCode;
    }
    public void setProvinceCode(String provinceCode){
        this.provinceCode = provinceCode;
    }

    public String getProvinceCode(){
        return provinceCode;
    }
    public void setCityCode(String cityCode){
        this.cityCode = cityCode;
    }

    public String getCityCode(){
        return cityCode;
    }
    public void setZoneCode(String zoneCode){
        this.zoneCode = zoneCode;
    }

    public String getZoneCode(){
        return zoneCode;
    }
    public void setBelongLocation(String belongLocation){
        this.belongLocation = belongLocation;
    }

    public String getBelongLocation(){
        return belongLocation;
    }
    public void setBelongUnit(String belongUnit){
        this.belongUnit = belongUnit;
    }

    public String getBelongUnit(){
        return belongUnit;
    }
    public void setBelongBuilding(String belongBuilding){
        this.belongBuilding = belongBuilding;
    }

    public String getBelongBuilding(){
        return belongBuilding;
    }
    public void setLongitude(String longitude){
        this.longitude = longitude;
    }

    public String getLongitude(){
        return longitude;
    }
    public void setLatitude(String latitude){
        this.latitude = latitude;
    }

    public String getLatitude(){
        return latitude;
    }
    public void setLatLonImg(String latLonImg){
        this.latLonImg = latLonImg;
    }

    public String getLatLonImg(){
        return latLonImg;
    }
    public void setStatus(Integer status){
        this.status = status;
    }

    public Integer getStatus(){
        return status;
    }
    public void setSortNum(Integer sortNum){
        this.sortNum = sortNum;
    }

    public Integer getSortNum(){
        return sortNum;
    }
    public void setDeptId(Long deptId){
        this.deptId = deptId;
    }

    public Long getDeptId(){
        return deptId;
    }
    public void setUserId(Long userId){
        this.userId = userId;
    }

    public Long getUserId(){
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("stationId", getStationId())
            .append("stationName", getStationName())
            .append("stationCode", getStationCode())
            .append("stationType", getStationType())
            .append("stationTypeCode", getStationTypeCode())
            .append("provinceCode", getProvinceCode())
            .append("cityCode", getCityCode())
            .append("zoneCode", getZoneCode())
            .append("belongLocation", getBelongLocation())
            .append("belongUnit", getBelongUnit())
            .append("belongBuilding", getBelongBuilding())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("latLonImg", getLatLonImg())
            .append("status", getStatus())
            .append("sortNum", getSortNum())
            .append("deptId", getDeptId())
            .append("userId", getUserId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }


}
